echo --------------------
echo Exporting libraries...
echo --------------------

export DEPENDENCY_LIBS=deplib
export BRILLIEN_CHIEFLIB=chieflib

export RABBIT=$DEPENDENCY_LIBS/amqp-client

export COMMONS_BEANUTILS=$DEPENDENCY_LIBS/commons-beanutils
export COMMONS_CLI=$DEPENDENCY_LIBS/commons-cli
export COMMONS_CODEC=$DEPENDENCY_LIBS/commons-codec
export COMMONS_DBCP=$DEPENDENCY_LIBS/commons-dbcp
export COMMONS_IO=$DEPENDENCY_LIBS/commons-io
export COMMONS_LOGGING=$DEPENDENCY_LIBS/commons-logging
export COMMONS_POOL=$DEPENDENCY_LIBS/commons-pool

export GMBAL_API=$DEPENDENCY_LIBS/gmbal-api-only
export GRIZZLY_FRAMEWORK=$DEPENDENCY_LIBS/grizzly-framework
export GRIZZLY_HTTP=$DEPENDENCY_LIBS/grizzly-http
export GRIZZLY_HTTP_SERVER=$DEPENDENCY_LIBS/grizzly-http-server
export GRIZZLY_HTTP_SERVLET=$DEPENDENCY_LIBS/grizzly-http-servlet
export GRIZZLY_RCM=$DEPENDENCY_LIBS/grizzly-rcm
export GRIZZLY_WEBSOCKETS=$DEPENDENCY_LIBS/grizzly-websockets

export HTTP_CLIENT=$DEPENDENCY_LIBS/httpclient
export HTTP_CORE=$DEPENDENCY_LIBS/httpcore

export COUCHDB=$DEPENDENCY_LIBS/jcouchdb

export JTA=$DEPENDENCY_LIBS/jta

export SERVLET_API=$DEPENDENCY_LIBS/javax.servlet-api

export SHIRO_CORE=$DEPENDENCY_LIBS/shiro-core

export SLF4J_API=$DEPENDENCY_LIBS/slf4j-api

export SMACK=$DEPENDENCY_LIBS/smack
export SMACKX=$DEPENDENCY_LIBS/smackx

export SVENSON=$DEPENDENCY_LIBS/svenson


export JMX_PORT=9009
export SERVER_NAME=Brillien

echo Library export done.
echo --------------------
echo
echo --------------------
echo Halting Brillien...
echo --------------------

java -Dsun.lang.ClassLoader.allowArraySyntax=true -classpath $BRILLIEN_CHIEFLIB/*:$DEPENDENCY_LIBS/*:$RABBIT/*:$COMMONS_BEANUTILS/*:$COMMONS_CLI/*:$COMMONS_CODEC/*:$COMMONS_DBCP/*:$COMMONS_IO/*:$COMMONS_LOGGING/*:$COMMONS_POOL/*:$GMBAL_API/*:$GRIZZLY_FRAMEWORK/*:$GRIZZLY_HTTP/*:$GRIZZLY_HTTP_SERVER/*:$GRIZZLY_HTTP_SERVLET/*:$GRIZZLY_RCM/*:$GRIZZLY_UTILS/*:$GRIZZLY_WEBSOCKETS/*:$HTTP_CLIENT/*:$HTTP_CORE/*:$COUCHDB/*:$JTA/*:$SERVLET_API/*:$SHIRO_CORE/*:$SLF4J_API/*:$SMACK/*:$SMACKX/*:$SVENSON/*:$WS_COMMON/* com.vii.brillien.management.admintool.TerminalAdmin $JMX_PORT $SERVER_NAME stop
